const render = $ => {
  $('#purehtml-container').html('Hello, render with jQuery');
  console.log($)
  // $("#purehtml-containertest").append(" <b>Hello world12!</b>");
};

if (!window.__POWERED_BY_QIANKUN__) {
  render();
}

(global => {
  global['purehtml'] = {
    bootstrap: () => {
      console.log('purehtml bootstrap');
      return Promise.resolve();
    },
    mount: (props) => {
      console.log('purehtml mount');
      props.onGlobalStateChange(function(state,prev){
        console.log(state,prev)
        console.log('state')
    },true)
    console.log('获取主应用传值',props)
      return render($);
    },
    unmount: () => {
      console.log('purehtml unmount');
      return Promise.resolve();
    },
  };
})(window);
